{% load i18n %} 
{% if user.get_profile and has_side %}
<div id="ProfileBox">
	<div id="Profile">
		<div id="ProfileProprait">
			<div id="UserProprait">
				<img class="box-shadow-dark" src="{{view_user.get_profile.gen_protrait}}" width="50" height="50"/>
			</div>
			<div id="UserFollow">
			{% ifequal page_type 'member' %}<button id="FollowBtn" title="{% ifequal is_followed 0 %}Follow{% else %}Followed{% endifequal%}" class="follow-btn {% ifequal is_followed 0 %}follow{% else %}followed{% endifequal%}" type="button" value="{{ view_user.id }}"></button>{% endifequal %}
			<!--{% trans 'Write mail' %}-->
			</div>
		</div>
		<div id="ProfileInfo">
			<div class="profile-nickname">{{view_user.username}}</div>
			<div class="profile-name">{% ifequal page_type 'member' %}<div class="profile-name-mail"><a href="/mail/mailto/{{ view_user.id }}/" class="mailtobtn"></a></div>{% endifequal %}<div class="profile-name-title">{{ view_user.get_profile.nickname }} {{  view_user.get_profile.gen_gender }}</div><div class="clearfix"></div></div>
			<div class="profile-last"><span>{{ view_user.last_login|date:"Y-m-d H:i:s" }}</span></div>
		</div>
        <div class="sign-content">{{ view_user.get_profile.sign }}</div>
		<div class="clearfix"></div>
	</div>
</div>

{% if page_type != 'search' %}
<div class="search" id="m_search">
    <form method="post" action="/search/">
        <input type="hidden" name="search_type" value="{{ page_type }}">
        <input type="text" id="m_keyword" name="searchstr" autocomplete="off" dycolor="false" title="Search microblogs" accesskey="3">
        <button type="submit" id="SearchButton" class="button orange">{% trans 'Search' %}</button>
    </form>
</div>
{% endif %}
{% if page_type != 'member' %}
<div class="right_nav">
    <ul>
        <li><a href="/member/">{% trans 'My microblogs' %}</a></li>
        <li><a href="/comments/in/">{% trans 'My comments' %}</a></li>
        <li><a href="/favorite/">{% trans 'My favorit' %}</a></li>
        <li><a href="/mail/inbox/">{% trans 'My mailbox' %}</a></li>
        <li><a href="/follow/in">{% trans 'Follow manage' %}</a></li>
    </ul>
</div>
{% endif %}

{% endif %}



{% if followed %}
<div class="clearblank"></div>
<div class="member-box-wrap">
	<div class="member-box-title">
		<div class="member-box-text">{% trans 'He Followed' %}</div>
	</div>
	<div class="member-box">
		<ul>
		{% for follow in followed %}
		<li>
			<a href="/member/{{follow.follower.username}}/" class="protrait"><img class="box-shadow" src="{{ follow.follower.get_profile.gen_protrait }}" width="40" height="40" /></a>
			<a href="/member/{{follow.follower.username}}/" class="member-nickname">{{ follow.follower.get_profile.nickname }}</a>
		</li>
		{% endfor %}
		</ul>
		<div class="clearfix"></div>
	</div>
</div>
{% endif %}




{% if follower %}
<div class="clearblank"></div>
<div class="member-box-wrap">
	<div class="member-box-title">
		<div class="member-box-text">{% trans 'People Followed him' %}</div>
	</div>
	<div class="member-box">
		<ul>
		{% for follow in follower %}
		<li>
			<a href="/member/{{follow.user.username}}/" class="protrait"><img class="box-shadow" src="{{ follow.user.get_profile.gen_protrait }}" width="40" height="40" /></a>
			<a href="/member/{{follow.user.username}}/" class="member-nickname">{{ follow.user.get_profile.nickname }}</a>
		</li>
		{% endfor %}
		</ul>
		<div class="clearfix"></div>
	</div>
</div>
{% endif %}



{% if members %}
<div class="member-box-wrap">
	<div class="member-box-title">
		<div class="member-box-text">{% trans 'Joined Recently' %}</div>
	</div>
	<div class="member-box">
		<ul>
		{% for member in members %}
		<li>
			<a href="/member/{{member.gen_username}}/" class="protrait"><img class="box-shadow" src="{{ member.user.get_profile.gen_protrait }}" width="40" height="40" /></a>
			<a href="/member/{{member.gen_username}}/" class="member-nickname">{{ member.nickname }}</a>
		</li>
		{% endfor %}
		</ul>
		<div class="clearfix"></div>
	</div>
</div>
{% endif %}
